<include file="Public:header"/>
<div class="data_list">
	<table>
		<tr>
			<th>服务名称</th>
			<th>类别</th>
			<th>售后</th>
			<th>下单时间</th>
			<th>订单状态</th>
			<notempty name="info.lawyer_user_id"><th>处理律师</th></notempty>
			<th>订单金额</th>
			<th>实付金额</th>
		</tr>
		<tr>
			<td> {$info['title']} </td>
			<td> {$info['category_name']} </td>
			<td>  </td>
			<td> {$info['datetime']} </td>
			<td> <span style="color: {$info['audit_status_color']}">{$info['audit_status_desc']}</span> </td>
			<notempty name="info.lawyer_user_id"><td> {$info['lawyer_name']}({$info['lawyer_mobile']}) </td></notempty>
			<td> <span class="price">{$info['order_amount']}</span> </td>
			<td> <span class="price">{$info['payed_amount']}</span> </td>
		</tr>
	</table>
</div>
<form action="" method="post" class="ajax-form">
	<div class="form_data">
		<div class="mod_name">
			<span class="name">买家需求描述</span>
		</div>
		<div class="mod_data">
			<div class="name">需求描述</div>
			<div class="input_data" style="width: 800px;">
				{$info['demand']|default='无'}
			</div>
		</div>

		<div class="mod_name">
			<span class="name">客服确认需求</span>
		</div>
		<div class="mod_data">
			<div class="name">确认需求</div>
			<div class="input_data" style="width: 800px;">
				{$info['service_confirm_demand']}
			</div>
		</div>

		<style type="text/css">
		.upload-box .input_data{
			width: 360px;
		}
		</style>
		{:W('Plugin/upload_file', array('agreement_file_ids', 'file', '合同附件', '', 1, '', 1, '', 0))}

		<div class="mod_name">
			<span class="name">律师记录</span>
		</div>
		<div class="data_list">
			<table>
				<volist name="info.todo_list" id="rs">
				<tr>
					<td style="text-align: left">{$i}.{$rs['content']} {:date('Y-m-d H:i:s', $rs['create_time'])}</td>
				</tr>
				</volist>
			</table>
		</div>
		<div class="mod_name">
			<span class="name">完成结果</span>
		</div>
		{:W('Plugin/upload_file', array('finish_file_ids', 'file', '合同附件', '', 1, '', 1, '', $info['audit_status'] == 'wait' ? 1 : 0))}

		<div class="mod_data">
			<div class="name">审核意见</div>
			<div class="input_data">
				<eq name="info.audit_status" value="wait">
					<textarea name="audit_comment" style="width:350px;height: 120px;">{$info['audit_comment']}</textarea>
				<else/>
					{$info['audit_comment']}
				</eq>
			</div>
		</div>

		<div class="mod_data">
			<div class="name">评价</div>
			<div class="input_data">
				<empty name="info.audit_comment_info">
					<div class="btn if-edit win" url="{:U('win_audit_comment', array('order_sn' => $info['order_sn']))}">评价</div>
				<else/>
					<div class="star-box">
						完成质量：
						<span class="pf_star">
							<span class="pf_star_on" style="width: {$info['audit_comment_info']['finish_quality_star'] * 20}%;"></span>
						</span>
					</div>
					<div class="star-box">
						工作速度：
						<span class="pf_star">
							<span class="pf_star_on" style="width: {$info['audit_comment_info']['working_speed_star'] * 20}%;"></span>
						</span>
					</div>
					<div class="star-box">
						服务态度：
						<span class="pf_star">
							<span class="pf_star_on" style="width: {$info['audit_comment_info']['service_attitude_star'] * 20}%;"></span>
						</span>
					</div>
				</empty>
			</div>
		</div>

		<div class="mod_data">
			<div class="name">审核结果</div>
			<div class="input_data">
				<eq name="info.audit_status" value="wait">
					<div>
						<label><input type="radio" name="audit_status" checked value="pass">通过，直接提交给客户</label>
					</div>
					<div>
						<label><input type="radio" name="audit_status" value="reject">不通过，退回律师修改</label>
					</div>
				<else/>
					<eq name="info.audit_status" value="pass">已通过<else/>未通过，返回律师修改</eq>
				</eq>
			</div>
		</div>

	</div>
	
	<div class="form_data">
		<div class="mod_submit">
			<eq name="info.audit_status" value="wait">
			<input type="hidden" name="service_user_id" value="{$info['service_user_id']}" />
			<button type="submit" class="btn btn-save">提交</button>
			</eq>
			<button class="btn btn-back">返回</button>
		</div>
	</div>
</form>
<script type="text/javascript">
$(document).ready(function () {
	$('.ajax-form').submit(function () {
		var audit_status  = $('input[name="audit_status"]:checked').val();
		var audit_comment = $('textarea[name="audit_comment"]').val();
		if(audit_status == 'reject' && !audit_comment){
			msgbox('审核意见不能为空！', 'error');
			return false;
		}
	});
	$('input[name="audit_status"]').change(function () {
		if($(this).val() == 'reject'){
			$('textarea[name="audit_comment"]').attr('datatype', '*');
		}else{
			$('textarea[name="audit_comment"]').removeAttr('datatype').removeClass('Validform_error');
		}
	});
})
</script>
<include file="Public:footer"/>